package com.hntest.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 实名认证表
 * @author xu
 *
 */
public class RealAuth extends BaseAuditDomain{

	/**
	 * 
	 */
	private static final long serialVersionUID = -8426018488712805L;
	public static final int SEX_MALE=0;//性别男
	public static final int SEX_FEMALE=1;//性别女
	private Integer id ;
	private String realName;//真实姓名
	private Integer sex=0;

    @DateTimeFormat(pattern="yyyy-MM-dd")//页面输入日期时，可以根据该格式自动进行类型转换
    private Date startDate;//开始日期
    @DateTimeFormat(pattern="yyyy-MM-dd")//页面输入日期时，可以根据该格式自动进行类型转换
    private Date endDate;//结束日期

    @DateTimeFormat(pattern="yyyy-MM-dd")//页面输入日期时，可以根据该格式自动进行类型转换
	private Date birthDate;//生日

	private String idNumber ="";//身份证号码
	private String address="";//身份证地址
	private String image1;//身份证正面照
	private String image2;//身份证背面照
	public String getSexDisplay() {
		return sex==0?"男":"女";
	}

    public RealAuth() {
        super.setState(-1);
    }

    public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getRealName() {
		return realName;
	}
	public void setRealName(String realName) {
		this.realName = realName;
	}
	public Integer getSex() {
		return sex;
	}
	public void setSex(Integer sex) {
		this.sex = sex;
	}
	public Date getBirthDate() {
		return birthDate;
	}
	public void setBirthDate(Date birthDate) {
		this.birthDate = birthDate;
	}
	public String getIdNumber() {
		return idNumber;
	}
	public void setIdNumber(String idNumber) {
		this.idNumber = idNumber;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getImage1() {
		return image1;
	}
	public void setImage1(String image1) {
		this.image1 = image1;
	}
	public String getImage2() {
		return image2;
	}
	public void setImage2(String image2) {
		this.image2 = image2;
	}

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    @Override
    public String toString() {
        return "RealAuth{" +
                "id=" + id +
                "state=" + super.getState() +
                ", realName='" + realName + '\'' +
                ", sex=" + sex +
                ", startDate=" + startDate +
                ", endDate=" + endDate +
                ", birthDate=" + birthDate +
                ", idNumber='" + idNumber + '\'' +
                ", address='" + address + '\'' +
                ", image1='" + image1 + '\'' +
                ", image2='" + image2 + '\'' +
                '}';
    }

    @Override
    public void setState(int state) {
        super.setState(state);
    }
}
